
import { useContext } from "react"
import Item from "./item"
import { Content } from './prvoider'
import { IContent } from './data'
const List = () => {
  const { todoList } = useContext(Content) as IContent
  return (
    <div>
      {todoList && todoList.map(item => {
        return (
          <Item key={item.id} data={item}></Item>
        )
      })}
    </div>
  )
}

export default List